<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <p>{{currentTime1()}}</p>
    <p>{{currentTime2}}</p>
</div>

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data:{
            message:"hello,kuangshen"
        },
        methods:{
            currentTime1:function (){
                return Date.now();//返回一个时间戳
            }
        },
        computed:{
            currentTime2:function (){
                return Date.now();//返回一个时间戳
            }
        }
    })

</script>
</body>
</html>